<?php
session_start();
//set system include file path
define('APP_DIR', realpath(dirname(__FILE__).'/../'));
define('PROP_URL', APP_DIR.'/upload/prop/');
define('DECORATE_URL', APP_DIR.'/upload/decorate/');
define('FOOD_URL', APP_DIR.'/upload/food/');
$include = get_include_path();
if(!in_array(APP_DIR, explode(PATH_SEPARATOR, $include))){
	$include .= PATH_SEPARATOR.APP_DIR;
	set_include_path($include);
}
//auto load class file
function __autoload($class){
	$classFile = APP_DIR.'/';
	$classFile .= str_replace('_', '/', $class);
	$classFile .= '.php';
	require_once $classFile;
}
//config
$config = include APP_DIR.'/config.php';
Kit_Db_Manager::setConfig($config['database']);
Kit_Memcache_Manager::setConfig($config['memcache']);
//基本参数
$act = isset($_GET['act'])?$_GET['act']:'';
$loged = isset($_SESSION['loged'])?$_SESSION['loged']:0;